package com.echoplots.json.entity;

import java.io.Serializable;
import java.util.Date;

import com.echoplots.json.serializer.StudentDeserializer;
import com.echoplots.json.serializer.StudentSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

@JsonSerialize(using = StudentSerializer.class)  //6.@JsonSerialize，指定一个实现类来自定义序列化
@JsonDeserialize (using = StudentDeserializer.class)//7.@JsonDeserialize，用户自定义反序列化，同@JsonSerialize ，类需要实现JsonDeserializer接口
public class Student implements Serializable {
    private static final long serialVersionUID = 6222176558369919436L;
	private String userName;
	private Date birthday;
    private int age;
    private String password;
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
    
    
}
